<!DOCTYPE html>
<html>
	<head>
	    <meta charset="utf-8">
	    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />
	    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
	    <title>Hello APP</title>
	    <link rel="stylesheet" type="text/css" href="../../css/index.css" />
	</head>
	<style type="text/css">
		.warp{width: 100%;}
		.info-box{width: 100%;}
		.info-box .info-one{align-items: center;height: 50px;padding: 0 15px;background: #FFFFFF;box-sizing: border-box;font-size: 14px;color: #4D4F50;}
		.info-box .info-one .r{text-align: right;padding: 10px 0;line-height: 30px;box-sizing: border-box;text-align: right;color: #999999;}
		.info-box .info-one.goto{background: url(../../image/main3/main3_goto.png) no-repeat right 10px center #FFFFFF;background-size:14px;padding-right: 30px;}
		.shouhuo-btn{height: 45px;background:#ffffff;height: 45px;border-radius:4px;text-align: center;line-height: 45px;font-size: 15px;color: #333;margin: 40px 15px 30px 15px;}
		.info-box .info-one:active{background: url(../../image/main3/main3_goto.png) no-repeat right 10px center #fafafa;background-size:14px;padding-right: 30px;}
	</style>
	<body>
		<div id="vue" class="warp">
			<div class="info-box">
	        	<div class="info-one flex goto border-bottom" data-url="main3/huan_phone.html" data-title="更换手机号" tapmode onclick="open_page(this)" >
	        		<div class="text">手机号</div>
	        		<div class="r flex1" v-text="udata.phone_hide"></div>
	        	</div>
	        	<div class="info-one flex goto border-bottom" tapmode  onclick="jianCe()">
	        		<div class="text">检查更新</div>
	        		<div class="r flex1"></div>
	        	</div>
	        	<div class="info-one flex goto border-bottom" tapmode  onclick="huancun()">
	        		<div class="text">清除缓存</div>
	        		<div class="r flex1" v-text="hcSize"></div>
	        	</div>
	        	<div class="info-one flex goto border-bottom" data-url="main3/band_other.html" data-title="第三方绑定" tapmode onclick="open_page(this)">
	        		<div class="text">第三方账号管理</div>
	        		<div class="r flex1"></div>
	        	</div>
	        	<div class="info-one flex goto border-bottom" data-url="main3/about_us.html" data-title="关于我们" tapmode onclick="open_page(this)">
	        		<div class="text">关于我们</div>
	        		<div class="r flex1"></div>
	        	</div>
	        	<div class="info-one flex goto border-bottom" data-url="main3/feedback.html" data-title="意见反馈" tapmode onclick="open_page(this)">
	        		<div class="text">意见反馈</div>
	        		<div class="r flex1"></div>
	        	</div>
				<div class="info-one flex goto" data-url="main3/zhuxiao.html" data-title="账号注销" tapmode onclick="open_page(this)">
	        		<div class="text">账号注销</div>
	        		<div class="r flex1"></div>
	        	</div>
			</div>
			<div class="shouhuo-btn" tapmode onclick="exit()">退出登录</div>
		</div>
	</body>
</html>
<script type="text/javascript" src="../../script/base.min.js" id="loadjs" data-js="L/swiper.min,L/lazyload,L/h-tool"></script>
<script type="text/javascript">

	define(function (require, exports, module) {

		setData = function () {
			var udata = lanYun.getUdata();
			//console.log(JSON.stringify(udata));
			lanYun.vue.udata = udata;
		};
		lanYun.newVue('#vue',{
			udata:{},
			hcSize:0,
		},function() {

		});
		setData();

		// 计算缓存数据
		api.getCacheSize(function(ret) {
			var size = ret.size / 1024 / 1024;
			size = size.toFixed(1);
			size > 0 ? size : 0;
			lanYun.vue.hcSize = size+'M';
		});

		//清除缓存
		huancun = function(){
			lanYun.alert({fname:'diaLogBox1',title:'提示', button:['取消','确定'],content: '您确定要清除缓存吗？'},function(ret){
	            if (ret.index == 0) return;
				api.clearCache(function() {
					lanYun.vue.hcSize = '0.0M';
		            lanYun.toast('缓存清理完毕');
				});
	        });
	    }

		//检测更新
		jianCe = function(){
			lanYun.get("home/getver",function (ret) {
				//console.log(JSON.stringify(ret));
				lanYun.alert({fname:'diaLogBox1',title:'提示', button:['确定'],content:ret.msg},function(ret){
		            if (ret.index == 0) return;
		        });
			},2)
	    }

		onShow = function () {
			var reshpage = lanYun.getStorage('reshpage');
			if(reshpage){
				lanYun.rmStorage('reshpage');
				setData();
			}
		}

		open_page = function (tis) {
	        var dst = tis.dataset;
	        lanYun.openWin(dst.url, {
	            win:'win',
	           	title:dst.title,
	            frameParam : dst
	       });
	    }

		// 退出登录
		exit = function(){
			lanYun.alert({fname:'diaLogBox1',title:'提示', button:['取消','确定'],content: '您确定要退出登录吗？'},function(ret){
	            if (ret.index == 0) return;
	            lanYun.loginOut(1);
				lanYun.event('toIndex');
	        });
      	}

	});

</script>
